package com.wdhcr.osspolicy.controller;

import com.wdhcr.osspolicy.component.OssComponent;
import com.wdhcr.osspolicy.mode.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/ali/oss")
public class AliOssController {

    @Autowired
    private OssComponent ossComponent;


    @GetMapping("/getpolicy")
    public R getPolicy() {
        Map<String, String> policy = ossComponent.getPolicy();
        R success = R.success(policy);
        return success;
    }

}
